package com.tsing.wms.mapper;

import com.tsing.wms.entity.StorehouseEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 仓库表 Mapper 接口
 * </p>
 *
 * @author TheTsing
 * @since 2022-04-13
 */
public interface StorehouseMapper extends BaseMapper<StorehouseEntity> {

    @Select("select sum(amount) num from t_stock where storehouse_id=#{id}")
    Long selectGoodsCount(@Param("id") String id);

}
